home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 21 / 021.d81 / category show (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  10KB  |  240 lines

  1. 0 rem**********************************  ****                               ***
  2. 1 rem            jeopardy           ***  ****    designed by   shibley      ***
  3. 2 rem                               ***  **************************************
  4. 3 rem
  5. 4 rem
  6. 10 printchr$(142)chr$(8):gosub5000:goto100
  7. 14 z$="":qt=ti+10000:poke198,.
  8. 15 print"[209][157]";:forj=1to40:getx$:ifx$=""thennext:ifti<qtthen18
  9. 16 ifqt<tithenprint" [157]";:return
  10. 17 j=40:next:goto20
  11. 18 print" [157]";:forj=1to40:getx$:ifx$=""thennext:ifti<qtthen15
  12. 19 ifqt<tithenprint" [157]";:return
  13. 20 if(x$="[157]"orx$=chr$(20))andlen(z$)=.then15
  14. 21 ifx$=chr$(13)orti>qtthenprint" [157]";:return
  15. 22 ifx$="[157]"orx$=chr$(20)thenz$=left$(z$,len(z$)-1):print"[157]  [157][157]";:goto15
  16. 24 ifx$>"z"orx$<" "orx$=chr$(34)orx$=","orx$=":"orx$=";"orlen(z$)=zthen15
  17. 25 print"[152]"x$;:z$=z$+x$:goto15
  18. 30 x1=.:x2=.:x3=.:l=len(ww$):forj=1tol:x$=mid$(ww$,j,1):ifx$<>"\"then35
  19. 31 ifx1=.thenx1=j:goto35
  20. 32 ifx2=.thenx2=j:goto35
  21. 33 ifx3=.thenx3=j
  22. 35 next:an$=left$(ww$,x1-1):tc=val(mid$(ww$,x1+1,1)):p2$=right$(ww$,l-x3)
  23. 37 qu$=mid$(ww$,x1+2,x2-x1-2):p1$=mid$(ww$,x2+1,x3-x2-1):return
  24. 50 rr=.:ifz$=qu$orz$=p1$orz$=p2$thenrr=1:goto79
  25. 52 l=len(qu$):iflen(z$)<4orl<4then79
  26. 54 ifl=len(z$)then68
  27. 56 iflen(z$)>lthen64
  28. 58 x=.:forj=1tol-len(z$)+1:ifz$=mid$(qu$,j,len(z$))thenx=j
  29. 60 next:ifx>.thenrr=1:goto79
  30. 62 goto68
  31. 64 x=.:forj=1tolen(z$)-l+1:ifqu$=mid$(z$,j,l)thenx=j
  32. 66 next:ifx>.thenrr=1:goto79
  33. 68 iftc>1orleft$(z$,1)<>left$(qu$,1)then79
  34. 70 x=.:forj=lto1step-1:ifmid$(qu$,j,1)=" "thenx=j:j=1
  35. 72 next:y=.:forj=len(z$)to1step-1:ifmid$(z$,j,1)=" "theny=j:j=1
  36. 74 next:ifx=.ory=.then79
  37. 76 x$=right$(z$,len(z$)-y):ifx$=p1$orx$=p2$orx$=right$(qu$,l-x)thenrr=1
  38. 79 return
  39. 80 u=54272:pokeu+1,20:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,17
  40. 81 fork=1to10:next:pokeu+4,16:return
  41. 84 u=54272:pokeu+1,220:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,17
  42. 85 fork=.to4:next:pokeu+4,16:return
  43. 88 u=54272:pokeu+1,6:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,3
  44. 89 fork=.to10:next:pokeu+4,16:return
  45. 92 u=54272:pokeu+1,50:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,7
  46. 93 fork=.to4:next:pokeu+4,16:return
  47. 100 poke53280,.:poke53265,peek(53265)and139
  48. 101 poke53281,7:print"[147]                                        ";
  49. 105 forj=.to22:print"  ";:next
  50. 110 print"                                       [157][148] "
  51. 115 print"                       "
  52. 116 print"[145] [154]                      "
  53. 117 print" [154]  category showdown [154]  "
  54. 120 print"[145] [154]                      "
  55. 125 print"                       "
  56. 130 printspc(18)"[152]from":print"[144]shibley software"
  57. 133 poke53265,peek(53265)or16:gosub80
  58. 135 print"[152]name of player 1 ? ";:z=8:gosub14:ifz$=""thenz$="player 1"
  59. 136 z$=z$+left$(sp$,9-len(z$)):p$(1)=z$:print
  60. 140 print"[152]name of player 2 ? ";:z=8:gosub14:ifz$=""thenz$="player 2"
  61. 141 z$=z$+left$(sp$,9-len(z$)):p$(2)=z$:print
  62. 145 print"[145][145][145][145][152]"p$(1)"select response key;       [157][157][157][157][157][157]";:z=1:gosub14
  63. 146 print:r$(1)=z$:ifz$=""thenr$(1)="z"
  64. 150 print"[152]"p$(2)"select response key;       [157][157][157][157][157][157]";:gosub14
  65. 151 r$(2)=z$:print:ifz$=""thenr$(2)="/"
  66. 175 poke53280,15:poke53281,15:print"[147]":c$(1)=".":t=62
  67. 180 z=1:open2,8,2,"0:abc,s,r":input#2,z:close2:open15,8,15:print#15,"s0:abc"
  68. 181 ifz>t-5thenz=int(rnd(.)*4+1)
  69. 185 close15:open3,8,3,"0:abc,s,w":print#3,z+6:close3
  70. 190 y=.:forj=ztoz+5:y=y+1
  71. 200 c$(y)=ca$(j):print"loading category"y"- "c$(y)"":gosub80
  72. 210 open2,8,2,"0:"+c$(y)+",s,r":input#2,t(y):ifst=.then215
  73. 211 close2:print"**** check disk":forl=1to4000:next:goto200
  74. 215 fork=1tot(y):input#2,cb$(y,k):nextk:close2
  75. 220 fork=1to5
  76. 225 x=int(rnd(.)*val(right$(ti$,1))*t(y)):ifx<1orx>t(y)then225
  77. 226 ifcb$(y,x)=""then225
  78. 228 w$(y,k)=cb$(y,x):cb$(y,x)="":nextk
  79. 245 nextj:h=1:hh=h
  80. 249 h=1
  81. 250 gosub4050
  82. 251 gosub4000:th=.:tg=3
  83. 252 printbo$"[146][223]"p$(h)"[157]'s   choice[146][169]"
  84. 255 printbc$"[146]category = ";:z=1:gosub14:ifz$="c"then250
  85. 257 ifz$="q"thenprint"[147]":goto800
  86. 260 ifz$<"1"orz$>"6"orz$=""then255
  87. 261 ca=val(z$):forj=1to5:ifa$(ca,j)<>"   "thenj=5:goto263: rem   it is ok!
  88. 262 next:goto255:  rem   loadstar code       [not allow wrong category]
  89. 263 :
  90. 265 ca=val(z$):print"[146]"spc(39+ca*6)z$
  91. 285 printbc$spc(18)"question amt. = ";
  92. 290 z=3:gosub14:ifz$<>""then295
  93. 291 forj=1to5:ifa$(ca,j)<>"   "thenz$=right$(str$(j),1)+"00":j=5
  94. 292 next
  95. 295 am=val(z$):ifz$="c"then250
  96. 299 ifam>500oram<100then285
  97. 300 ifam<>val(a$(ca,am/100))then285
  98. 310 print"[146]"spc(37+ca*6);:aa=am/100:forj=1toaa:print"";:next:print"[145][145]";
  99. 315 print"[156]     [157][157][157][157][157] "a$(ca,aa)" [157][157][157][157][157]     ";:forj=1to300:next
  100. 320 print"[157][157][157][157][157][145][145]     [157][157][157][157][157] "a$(ca,aa)" [157][157][157][157][157]     ";:forj=1to300:next
  101. 330 print"[146][157][157][157][157][157][145][145]     [157][157][157][157][157] "a$(ca,aa)" [157][157][157][157][157]     ":ww$=w$(ca,aa)
  102. 335 gosub30:a$(ca,aa)="   "
  103. 350 poke53280,6:print"[147][156]"spc(20-(len(c$(ca))/2))c$(ca)""
  104. 355 printspc(15)"for  "am"":print"[159] [197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][144]"
  105. 375 x=39:iflen(an$)<40thenprintan$"":goto385
  106. 380 x=x-1:ifmid$(an$,x,1)<>" "then380
  107. 381 print" "left$(an$,x):printright$(an$,len(an$)-x)""
  108. 385 qt=ti+(len(an$)*7)+(tg*40):gosub92:poke198,.
  109. 387 getx$:ifx$=r$(1)andth<>1thenhh=1:goto400
  110. 390 ifx$=r$(2)andth<>2thenhh=2:goto400
  111. 392 ifti<qtthen387
  112. 394 forj=1to10:gosub92:next
  113. 395 print"[144]"pr$(tc)": [152]"qu$:forj=1to1000:next:goto575
  114. 400 print""spc(16)p$(hh)""
  115. 405 print"[144]"pr$(tc)": ";:
  116. 420 qt=ti+300+(len(an$)*9):z=25:z$="":poke198,.:gosub15:print
  117. 425 gosub50:ifrr=.then550
  118. 545 gosub84:print"[145]"spc(len(pr$(tc))+3)qu$sp$""
  119. 546 printspc(17)"[150]right":forj=1to2000:next:m(hh)=m(hh)+am:h=hh
  120. 549 goto575
  121. 550 gosub88:m(hh)=m(hh)-am
  122. 560 print:printspc(17)"wrong":forj=1to500:next:tg=.5:ifth>.then570
  123. 565 th=hh:print""sp$""sp$"":printsp$"":goto385
  124. 570 print"[145][145][145][144]"pr$(tc)": [152]"qu$sp$
  125. 575 x=.:forj=1to6:fork=1to5:ifa$(j,k)<>"   "thenx=1
  126. 580 next:next:ifx>.thenforj=1to3000:next:goto251
  127. 585 gosub80:poke53280,15:poke53281,.:print"[147][154]                      "
  128. 590 printspc(9)" [159] category show-down [154] "
  129. 595 printspc(9)"                      "
  130. 600 print"[158] the final category is : ";
  131. 605 f=int(rnd(.)*val(right$(ti$,1))*t):iff>t orf=.then605
  132. 610 y=.:forj=1to6:ifc$(j)=ca$(f)theny=1
  133. 620 next:ify=1then605
  134. 625 gosub80:printca$(f)"[150]":printp$(1)" has[159]"m(1)"   [150]"p$(2)" has[159]"m(2)""
  135. 630 xx=.:b(1)=.:b(2)=.:ifm(1)<1andm(2)<1then770
  136. 631 ifm(1)<1thenxx=1:goto650
  137. 632 ifm(2)<1thenxx=1:goto640
  138. 635 ifm(1)>m(2)then650
  139. 640 print"[154]"p$(1)" what's your wager ";:z=len(str$(m(1)))-1:gosub14:print""
  140. 645 b(1)=val(z$):xx=xx+1:ifxx>1then660
  141. 650 print"[154]"p$(2)" what's your wager ";:z=len(str$(m(2)))-1:gosub14:print""
  142. 655 b(2)=val(z$):xx=xx+1:ifxx<2then640
  143. 660 ifb(1)>m(1)thenb(1)=m(1)
  144. 662 ifb(2)>m(2)thenb(2)=m(2)
  145. 665 open2,8,2,"0:"+ca$(f)+",s,r":input#2,t(7):ifst=.then670
  146. 666 close2:print"[150]check disk";:goto665
  147. 670 x=int(rnd(.)*val(right$(ti$,1))*t(7)):ifx>=t(7)then670
  148. 675 ifx>.thenforj=1tox:input#2,x$:next
  149. 680 input#2,ww$:close2:gosub30
  150. 685 poke53280,4:print"[147][158]"spc(20-(len(ca$(f))/2))ca$(f)"":gosub80
  151. 690 x=39:xx=.:iflen(an$)<40thenprintan$"":goto700
  152. 695 x=x-1:ifmid$(an$,x,1)<>" "then695
  153. 696 print" "left$(an$,x):printright$(an$,len(an$)-x)""
  154. 700 ifm(1)<1then720
  155. 710 print"    [155] "p$(1)" what's your question":z=25:print"[154]"pr$(tc)": ";
  156. 715 gosub14:print"":a1$=z$
  157. 718 ifm(2)<1then730
  158. 720 print"     [155]"p$(2)" what's your question":z=25:print"[154]"pr$(tc)": ";
  159. 725 gosub14:print"":a2$=z$
  160. 730 print"[150]"pr$(tc)":"qu$sp$
  161. 735 print"";:ifm(1)<1thenprint"[145][145][145][145]";:goto750
  162. 740 z$=a1$:gosub50:ifrr=1thenprint"right   ":gosub84:m(1)=m(1)+b(1):got